package com.joejag.mavenstats.server.reports;

import com.joejag.mavenstats.client.dto.ReportDTO;

public class ReportTestUtils
{

  public static int findOccurancesOfHtmlElement(ReportDTO dto, String element)
  {
    String body = dto.body;
    int count = 0;
    while (body.indexOf(element) > 0)
    {
      count++;
      body = body.substring(body.indexOf(element) + 1);
    }
    return count;
  }
}
